import React from 'react';
import { primaryColor } from '@/defaultSettings';
import styles from './index.less';

const PickerHead = ({ title = '', cancelText = '取消', submitText = '确定', onCancel, onSubmit, ...rest }) => (
    <div className={styles.pickerHead} {...rest}>
        <div onClick={onCancel}>{cancelText}</div>
        <div className={styles.title}>{title}</div>
        <div onClick={onSubmit} style={{ color: primaryColor }}>
            {submitText}
        </div>
    </div>
);

export default PickerHead;
